<?php $this->_extends('_layouts/bootstrap_layout'); ?>

<?php $this->_block('pageJs'); ?>
	<script src="<?php echo $js_url; ?>libs/jquery.easing.js" type="text/javascript" ></script>
	<script src="<?php echo $js_url; ?>libs/jquery.masonry.js" type="text/javascript" ></script>
	
<?php $this->_endblock(); ?>

<?php $this->_block('pageCss'); ?>
	
<?php $this->_endblock(); ?>

<?php $this->_block('title'); ?>
	Htmltemplates - Html模板
<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>
	<div class="span9 noMargin">
		<h3 class="title1">
			Free CSS/(X)HTML Templates - HTML模板
		</h3>
		<div class="pagination span9 noMarginL">
			<?php echo $pagination; ?>
		</div>
		<div class="thumbnails">
			<?php if(!empty($htmlTemplates)): ?>
				<div class="waterFall row noMarginL show-grid">
					<?php foreach($htmlTemplates as $k => $ht): ?>
						<div class="span3 son-noMarginL waterFallItem marginB1-2 hasTooltip" data-title="<?php echo $ht['description']; ?>">
							<div class="thumbnail">
								<h5><?php echo $ht['name']; ?></h5>
								<p>
									<span class="label label-info"><?php echo $ht['type_area']; ?></span>
									<span class="label label-info"><?php echo $ht['type_using']; ?></span>
									<span class="label label-info"><?php echo $ht['type_color']; ?></span>
									<span class="label label-info"><?php echo $ht['type_columnwidth']; ?></span>
									<span class="label label-info"><?php echo $ht['type_sidebarcorner']; ?></span>
								</p>
<!--								<p><?php //echo $ht['description']; ?></p>-->
								<a href="<?php echo url('htmltemplate/preview', array('id' => $ht['id'])); ?>" class="thumbnail Hspace3" target="_blank">
									<img class="h180MaxWparent" alt="<?php echo $ht['name']; ?>" src="<?php echo $htmltemp_url . $ht['root_foldername'] . '/' . $ht['thumb_big']; ?>" />
								</a>
								<div class="row-fluid noMargin son-noMarginL marginT1-2">
									<div class="span6 text-center">
										<a class="btn btn-small" type="button" target="_blank" 
											href="<?php echo isset($ht['download_pack'])? $htmltemp_url . $ht['root_foldername'] . '/' . $ht['download_pack'] : 'javascript: void(0)'; ?>" 
										>
											<?php echo isset($ht['download_pack'])? '下载此模板' : '暂时没有提供下载'; ?>
										</a>
									</div>
	
									<div class="btn-group span6 text-center">
										<button class="btn btn-small btn-primary dropdown-toggle" data-toggle="dropdown"><!-- hoverc -->
											点击预览 
											<span class="caret"></span>
										</button>
										<ul class="dropdown-menu btn-block">
											<li><a href="<?php echo url('htmltemplate/preview', array('id' => $ht['id'])); ?>">本页前往</a></li>
											<li><a href="<?php echo url('htmltemplate/preview', array('id' => $ht['id'])); ?>" target="_blank">在新窗口中打开</a></li>
										</ul>
									</div>
								</div>
							</div>
						</div>
					<?php endforeach; ?>
				</div>
			<?php else: ?>	
				<div class="alert alert-info">
					没有找到符合条件的结果...
				</div>
			<?php endif; ?>
		</div>
		<div class="pagination span9 noMarginL">
			<?php echo $pagination; ?>
		</div>
	</div>
		
<?php $this->_endblock(); ?>

